Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AC power source amplitude fix #1112

Merged
merged 3 commits into from
Dec 6, 2024
Merged

Conversation

KrzysztofHerman
Copy link
Contributor

This PR fix two issues:

  1. Description string in AC POWER SOURCE related to the power field. It changes Watts to dBm

image

  1. Calculation of the amplitude of the voltage source. In the previous version a peak-to-peak voltage was calculated and streamed to the spice netlist. According to the ngspice and Xyce specification a voltage amplitude is required. See ngspice manual:

image

Example from the figure above:

VP1 _net0 0 dc 0 ac 0.316228 SIN(0 0.316228 1MEG) portnum 1 z0 50

@ra3xdh
Copy link
Owner

ra3xdh commented Dec 3, 2024

The magnitude calculation was recently fixed to match the data from Ngspice and Qucsator. See #779 and #780

@KrzysztofHerman
Copy link
Contributor Author

@ra3xdh indeed, it considers the voltage divider on the ideally matched network so the previous fix is the correct one. Shall I fix only the string in the properties window?

@ra3xdh
Copy link
Owner

ra3xdh commented Dec 4, 2024

Yes, modify the PR.

@ra3xdh ra3xdh added this to the 25.1.0 milestone Dec 6, 2024
@ra3xdh
Copy link
Owner

ra3xdh commented Dec 6, 2024

Merged.

@ra3xdh ra3xdh merged commit 9e4ac5a into ra3xdh:current Dec 6, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants